package org.raymond.iworks.study.basic.designpattern.command;

/**
 * @author raymond
 * @version V1.0
 * @Description: TODO
 */
public class LightOffCommand implements Command{
    private LightReceiver lightReceiver;
    public LightOffCommand(LightReceiver lightReceiver){
        this.lightReceiver = lightReceiver;
    }
    @Override
    public void execute() {
        lightReceiver.off();
    }

    @Override
    public void undo() {
        lightReceiver.on();
    }
}
